<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.5.1.min.js"></script>
<script type="text/javascript">
	$(function(){
		//中心点横坐标
		var dotLeft = ($(".container").width()-$(".dot").width())/2;
		//中心点纵坐标
		var dotTop = ($(".container").height()-$(".dot").height())/2;
		//起始角度
		var stard = 0;
		//半径
		var radius = 200;
		//每一个BOX对应的角度;
		var avd = 360/$(".box").length;
		//每一个BOX对应的弧度;
		var ahd = avd*Math.PI/180;
		
		console.log(Math.sin(ahd*2));
		console.log(Math.sin(ahd*6));
		
		console.log(Math.cos(ahd*2));
		console.log(Math.cos(ahd*3));
		
		
		//设置圆的中心点的位置
		$(".dot").css({"left":dotLeft,"top":dotTop});
		$(".box").each(function(index, element){
            $(this).css({"left":Math.sin((ahd*index))*radius+dotLeft,"top":Math.cos((ahd*index))*radius+dotTop});
        });
	})
</script>
<style type="text/css">
*{margin:0;padding:0;}
.container{position:relative;width:700px;height:800px; margin:0 auto; border:1px solid #F00;}
.box{position:absolute;width:50px;height:50px;background:#FC0;}
.dot{ position:absolute;width:20px;height:20px;background:#F00;}
</style>
</head>
<body>
<div class="container">
	<div class="dot">A</div>
	<div class="box">B</div>
	<div class="box">C</div>
	<div class="box">D</div>
	<div class="box">E</div>
	<div class="box">F</div>
	<div class="box">G</div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box"></div>
</div>
</body>
</html>
